import Vue from 'vue'
import Router from 'vue-router'

// in development-env not use lazy-loading, because lazy-loading too many pages will cause webpack hot update too slow. so only in production use lazy-loading;
// detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading

Vue.use(Router)

/* Layout */
import Layout from '../views/layout/Layout'
import temp from '../views/temp/index'

/**
* hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
* alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
*                                if not set alwaysShow, only more than one route under the children
*                                it will becomes nested mode, otherwise not show the root menu
* redirect: noredirect           if `redirect:noredirect` will no redirct in the breadcrumb
* name:'router-name'             the name is used by <keep-alive> (must set!!!)
* meta : {
    title: 'title'               the name show in submenu and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar,
  }
**/
export const constantRouterMap = [{
    path: '/login',
    component: () =>
      import('@/views/login/login'),
    hidden: true
  },
  {path: '/diver',
    component: () =>
      import('@/views/diver/diver'),
    hidden: true
  },
  {
    path: '/forgetpassword',
    name: 'forgetpassword',
    component: () =>
      import('@/views/login/changepassword'),
    meta: {
      title: '找回密码',
      icon: ''
    },
  },
  {
    path: '/setpaypwd',
    name: 'setpaypwd',
    component: () =>
      import('@/views/login/setpaypwd'),
    meta: {
      title: '设置密码',
      icon: ''
    },
  },
  {
    path: '/404',
    component: Layout,
    children: [{
      path: '',
      component: () =>
        import('@/views/404'),
      hidden: true
    }]
  },
  {
    path: '/ins',
    component: () =>
      import('@/views/ins'),
    hidden: true
  },
  {
    path: '/',
    component: Layout,
    redirect: '/login',
    name: 'login',
    hidden: true,
    children: [{
      path: 'login',
      component: () =>
        import('@/views/login/index'),
      meta: {
        title: '',
        icon: ''
      },
    }, ]
  },
  {
    path: '/home',
    component: Layout,
    name: 'homeMenu',
    meta: {
      title: ''
    },
    children: [{
        path: '',
        name: 'home',
        component: () =>
          import('@/views/dashboard/index'),
        meta: {
          title: '',
          icon: 'home'
        }
      }, {
        path: '/announceDetail',
        name: 'announceD',
        component: () =>
          import('@/views/dashboard/announceD'),
        meta: {
          title: '公告详情'
        },
      },

    ]
  },
   {
    path: '/message',
    component: Layout,
    name: 'message',
    children: [{
      path: '/message/messagedetail',
      name: 'messagedetail',
      component: () =>
        import('@/views/message/index'),
      meta: {
        title: '消息'
      }
    }]
  },
  {
    path: '/help',
    component: Layout,
    name: 'help',
    children: [{
      path: '/help/helptext',
      name: 'helptext',
      component: () =>
        import('@/views/helptext/index'),
      meta: {
        title: '帮助文档'
      }
    }]
  },
  {
    path: '/platform',
    component: Layout,
    name: 'chudanMenu',
    children: [{
      path: '',
      name: 'chudan',
      component: () =>
        import('@/views/dashboard/index'),
      meta: {
        title: '出单平台',
        icon: 'chudan'
      }
    }]
  },

  {
    path: '/guaranteeslip',
    component: Layout,
    redirect: '/guaranteeslip/query',
    name: 'policyins',
    meta: {
      title: '保单管理',
      icon: 'baodan'
    },
    children: [{
        path: 'insentry',
        name: 'insentry',
        component: () =>
          import('@/views/ins/index'),
        meta: {
          title: '保单登记2'
        },
        hidden: true
      },

      {
        path: 'inport',
        name: 'policyMenu',
        component: temp,
        meta: {
          title: '保单登记',
        },
        children: [
        {
            path: '',
            name: 'policyNumber',
            component: () =>
              import('@/views/policyfile/policyNumber'),
            meta: {
              title: '按保单号单条登记',
            }
          },
        {
            path: 'insentry1',
            name: 'insentry1',
            component: () =>
              import('@/views/policyfile/policyanumber'),
            meta: {
              title: '按保单号登记',
            }
          },
          {
            path: 'policyexcel',
            name: 'policyexcel',
            component: () =>
              import('@/views/policyfile/policyexcel'),
            meta: {
              title: 'EXCEL表格导入',
            }
          },
          {
            path: 'policyhistory',
            name: 'policyhistory',
            component: () =>
              import('@/views/policyfile/policyhistory'),
            meta: {
              title: '保单导入历史',
            }
          },
          {
            path: 'load',
            name: 'load',
            component: () =>
              import('@/views/policyfile/load'),
            meta: {
              title: '登记成功'
            },
            hidden: true
          },
          {
            path: 'lead',
            name: 'lead',
            component: () =>
              import('@/views/policyfile/lead'),
            meta: {
              title: '登记成功'
            },
            hidden: true
          },
          {
            path: 'indetail:id',
            name: 'indetail',
            component: () =>
              import('@/views/policyfile/indetail'),
            meta: {
              title: '查看详情'
            },
            hidden: true
          },
        ]
      },

      {
        path: 'query',
        name: 'policyqueryMenu',
        component: temp,
        meta: {
          title: '保单查询'
        },
        children: [{
            path: '',
            name: 'policyquery',
            component: () =>
              import('@/views/policyquery/policyquery'),
            meta: {
              title: ''
            }
          },
		{
            path: 'policyonedetails/:id',
            name: 'policyonedetails',
            component: () =>
              import('@/views/policyfile/policyonedetails'),
            meta: {
              title: '保单详情'
            },
            hidden: true
          },
          {
            path: 'detail/:id',
            name: 'policydetail',
            component: () =>
              import('@/views/policyquery/policydetail'),
            meta: {
              title: '保单详情'
            },
            hidden: true
          },
          {
            path: 'Insurance',
            name: 'Insurance',
            component: () =>
              import('@/views/policyquery/policyInsurance'),
            meta: {
              title: '保单导出'
            },
            hidden: true
          }
        ]
      },
      // {
      //   path: 'policyfile/policynumber',
      //   name: 'policyMenu',
      //   component:temp,
      //   meta: { title: '保单登记', },
      //   children:[
      //     {
      //       path: '',
      //       name: '',
      //       component: () => import('@/views/policyfile/policynumber'),
      //       meta: { title: '按保单号登记', }
      //     },
      //     {
      //       path: 'policyexcell',
      //       name: 'policyexcel',
      //       component: () => import('@/views/policyfile/policyexcel'),
      //       meta: { title: 'EXCEL表格导入', }
      //     },
      //     {
      //       path: 'policyhistory',
      //       name: 'policyhistory',
      //       component: () => import('@/views/policyfile/policyhistory'),
      //       meta: { title: '保单导入历史', }
      //     },
      //   ]
      // },


      // {
      //   path: 'inport',
      //   name: 'insentryMenu',
      //   component:temp,
      //   meta: { title: '保单登记', keepAlive: true },
      //   children:[
      //     {
      //       path: '',
      //       name: 'insentry1',
      //       component: () => import('@/views/insentry/index'),
      //       meta: { title: '', keepAlive: true }
      //     },
      //     {
      //       path: 'excel',
      //       name: 'insentry2',
      //       component: () => import('@/views/insentry/index'),
      //       meta: { title: 'EXCEL表格保单登记', keepAlive: true }
      //     },
      //     {
      //       path: 'tasks',
      //       name: 'insentry3',
      //       component: () => import('@/views/insentry/index'),
      //       meta: { title: '查看导入任务', keepAlive: true }
      //     },
      //     {
      //       path: 'load',
      //       name: 'load',
      //       component: () => import('@/views/insentry/load'),
      //       meta: { title: '登记成功' },
      //       hidden: true
      //     },
      //     {
      //       path: 'indetail:id',
      //       name: 'indetail',
      //       component: () => import('@/views/insentry/indetail'),
      //       meta: { title: '查看详情' },
      //       hidden: true
      //     },
      //     {
      //       path: 'lead',
      //       name: 'lead',
      //       component: () => import('@/views/insentry/lead'),
      //       meta: { title: '上传成功' },
      //       hidden: true
      //     },
      //   ]
      // },



      {
        path: 'endorsement1',
        name: 'insbatch',
        component: () =>
          import('@/views/operationlog/index'),
        meta: {
          title: '批单登记'
        }
      },

    ]
  },
  {
    path: '/policy',
    component: Layout,
    redirect: '/policy/upstream/edit/',
    name: 'policy',
    meta: {
      title: '政策管理',
      icon: 'zhengce'
    },
    children: [{
        path: 'policyupnewdd',
        name: 'policyupnewdd',
        component: () =>
          import('@/views/policynew/index'),
        meta: {
          title: '政策新建'
        },
        hidden: true
      },
      {
        path: 'policydowninfo',
        name: 'policydowninfo',
        component: () =>
          import('@/views/policynew/index'),
        meta: {
          title: '下游政策详情'
        },
        hidden: true
      },
      {
        path: 'policyupedit',
        name: 'policyupedit',
        component: () =>
          import('@/views/policynew/index'),
        meta: {
          title: '政策编辑'
        },
        hidden: true
      },
      {
        path: 'upstream/list',
        name: 'policyupMenu',
        component: temp,
        meta: {
          title: '上游政策列表'
        },
        children: [{
            path: '',
            name: 'policyup',
            component: () =>
              import('@/views/ucommission/index'),
            meta: {
              title: ''
            }
          },
          {
            path: 'details',
            name: 'policyupper3c_list',
            component: () =>
              import('@/views/policynew/policyupper3c'),
            meta: {
              title: '上游政策编辑'
            },
            hidden: true
          },
          {
            path: 'policyupedit',
            name: 'up_policyupedit',
            component: () =>
              import('@/views/policynew/index'),
            meta: {
              title: '政策编辑'
            },
            hidden: true
          },
          {
            path: 'sysdetails',
            name: 'policyupper3s',
            component: () =>
              import('@/views/policynew/policyupper3s'),
            meta: {
              title: '上游政策编辑'
            },
            hidden: true
          },
          {
            path: 'editdetails',
            name: 'policydowninfo_edit',
            component: () =>
              import('@/views/policynew/index'),
            meta: {
              title: '上游政策详情1111111111'
            },
            hidden: true
          },
        ]
      },
      // {
      //   path: 'upstream/list/details',
      //   name: 'policyupper3c_list',
      //   component: () => import('@/views/policynew/policyupper3c'),
      //   meta: { title: '上游政策编辑' },
      //   hidden: true
      // },
      //  {
      //   path: 'upstream/list/details/editdetails',
      //   name: 'policydowninfo_edit',
      //   component: () => import('@/views/policynew/index'),
      //   meta: { title: '下游政策详情1111111111' },
      //   hidden: true
      // },
      {
        path: 'downstream/list',
        name: 'policydownMenu',
        component: temp,
        meta: {
          title: '下游政策列表'
        },
        children: [{
            path: '',
            name: 'policydown',
            component: () =>
              import('@/views/dcommission/index'),
            meta: {
              title: ''
            }
          },
          {
            path: 'details',
            name: 'policylower3_list',
            component: () =>
              import('@/views/policynew/policylower3'),
            meta: {
              title: '下游政策编辑'
            },
            hidden: true
          },
          {
            path: 'policydowninfo',
            name: 'down_policydowninfo',
            component: () =>
              import('@/views/policynew/index'),
            meta: {
              title: '下游政策详情'
            },
            hidden: true
          },
          {
            path: 'sysdetails',
            name: 'policylower3s',
            component: () =>
              import('@/views/policynew/policylower3s'),
            meta: {
              title: '下游政策编辑'
            },
            hidden: true
          },
        ]
      },
      // {
      //   path: 'downstream/list/details',
      //   name: 'policylower3_list',
      //   component: () => import('@/views/policynew/policylower3'),
      //   meta: { title: '下游政策编辑' },
      //   hidden: true
      // },
      {
        path: 'approval',
        name: 'approval2',
        redirect: '/policy/approval',
        component: temp,
        meta: {
          title: '政策审批'
        },
        children: [{
            path: '',
            name: 'approval',
            component: () =>
              import('@/views/policy/policyapp'),
            meta: {
              title: ''
            },
          },
          {
            path: 'upapproval',
            name: 'policyupper3c_approval',
            component: () =>
              import('@/views/policynew/policyupper3c'),
            meta: {
              title: '上游政策审批'
            },
          },
          {
            path: 'downapproval',
            name: 'policylower3_approval',
            component: () =>
              import('@/views/policynew/policylower3'),
            meta: {
              title: '下游政策审批'
            },
            hidden: true
          },
          {
            path: 'upapprovalsys',
            name: 'policyupper3s_approval',
            component: () =>
              import('@/views/policynew/policyupper3s'),
            meta: {
              title: '上游政策审批'
            },
          },
          {
            path: 'downapprovalsys',
            name: 'policylower3s_approval',
            component: () =>
              import('@/views/policynew/policylower3s'),
            meta: {
              title: '下游政策审批'
            },
            hidden: true
          },
        ]
      },
      {
        path: 'policyform',
        name: 'policyformMenu',
        component: temp,
        meta: { title: '政策匹配报表', },
        children: [{
          path: '',
          name: 'policyform',
          component: () =>
            import('@/views/reportform/policyform'),
        },
        {
          path: 'policyformdetail',
          name: 'policyformdetail',
          component: () =>
            import('@/views/reportform/policyformdetail'),
          meta: { title: '政策批次匹配详情', }
        },
        {
          path: 'policiesdetail',
          name: 'policiesdetail',
          component: () =>
            import('@/views/reportform/policiesdetail'),
          meta: { title: '政策条目匹配详情', }
        },
        ]
      },

      {
        path: 'approval/up/detail',
        name: 'approvalup',
        component: () =>
          import('@/views/policynew/policyupCdetail/detail'),
        meta: {
          title: '上游政策批次详情'
        },

      },
      {
        path: 'approval/down/detail',
        name: 'approvaldown',
        component: () =>
          import('@/views/policynew/policylowerCdetail/detail'),
        meta: {
          title: '下游政策批次详情'
        },
        //  hidden:true 
      },

      {
        path: 'approvalDetail/:batchId',
        name: 'approvalDetail',
        component: () =>
          import('@/views/policy/detail'),
        meta: {
          title: '政策审批查看详情'
        },
        hidden: true
      },
      {
        path: 'upstream/edit/',
        name: 'policyupper1',
        component: () =>
          import('@/views/policynew/policyupper1'),
        meta: {
          title: '创建上游政策批次'
        }
      },
      {
        path: 'upstream/edit/policyupedit',
        name: 'addup_policyupedit',
        component: () =>
          import('@/views/policynew/index'),
        meta: {
          title: '政策编辑'
        },
        hidden: true
      },
      //    {
      //      path: 'upstream/edit/step2',
      //      name: 'policyupper2',
      //      component: () => import('@/views/policynew/policyupper2'),
      //      meta: { title: '创建上游政策批次'},
      //      hidden:true
      //    },
      {
        path: 'upstream/edit/details',
        name: 'policyupper3c',
        component: () =>
          import('@/views/policynew/policyupper3c'),
        meta: {
          title: '创建上游政策批次'
        },
        hidden: true
      },
      {
        path: 'upstream/edit/step3',
        name: 'policyupper3s',
        component: () =>
          import('@/views/policynew/policyupper3s'),
        meta: {
          title: '创建上游政策批次'
        },
        hidden: true
      },
      {
        path: 'upstream/edit/step4',
        name: 'policyupper4',
        component: () =>
          import('@/views/policynew/policyupper4'),
        meta: {
          title: '创建上游政策批次'
        },
        hidden: true
      },
      {
        path: 'upstream/list/detail',
        name: 'policyupCdetail',
        component: () =>
          import('@/views/policynew/policyupCdetail/detail'),
        meta: {
          title: '上游政策批次详情'
        },

      },
      {
        path: 'upstream/list/detailsmode',
        name: 'detailsmode',
        component: () =>
          import('@/views/policynew/policyupCdetail/detailsmodel'),
        meta: {
          title: '上游政策批次详情'
        },
        hidden: true
      },
      {
        path: 'downstream/list/detail',
        name: 'policylowerCdetail',
        component: () =>
          import('@/views/policynew/policylowerCdetail/detail'),
        meta: {
          title: '下游政策批次详情'
        },
        //  hidden:true 
      },
      {
        path: 'downstream/edit/details',
        name: 'policylower3',
        component: () =>
          import('@/views/policynew/policylower3'),
        meta: {
          title: '创建下游政策批次'
        },
        hidden: true
      },
      {
        path: 'downstream/edit/details/policydowninfo',
        name: 'adddown_policydowninfo',
        component: () =>
          import('@/views/policynew/index'),
        meta: {
          title: '下游政策详情'
        },
        hidden: true
      },
      {
        path: 'downstream/edit/systemdetails',
        name: 'policylower3s',
        component: () =>
          import('@/views/policynew/policylower3s'),
        meta: {
          title: '下游政策编辑'
        },
        hidden: true
      },
      {
        path: 'downstream/edit/step4',
        name: 'policylower4',
        component: () =>
          import('@/views/policynew/policylower4'),
        meta: {
          title: '4创建下游政策批次'
        },
        hidden: true
      },
      {
        path: 'downstream/edit/',
        name: 'policydownnew',
        component: () =>
          import('@/views/dashboard/downstream1'),
        meta: {
          title: '创建下游政策批次'
        }
      },
      {
        path: 'downstream/edit/step2',
        name: 'policydownnew2',
        component: () =>
          import('@/views/dashboard/downstream2'),
        meta: {
          title: '创建下游政策批次'
        },
        hidden: true
      }
      //    {
      //      path: 'downstream/edit1',
      //      name: 'downstream1',
      //      component: () => import('@/views/dashboard/downstream1'),
      //      meta: { title: '创建下游政策批次1'}
      //      //hidden:true
      //    },
    ]
  },
  {
    path: '/finance',
    component: Layout,
    redirect: '/finance/upstream/settle',
    name: 'finance',
    meta: {
      title: '财务管理',
      icon: 'caiwu'
    },
    children: [{
        path: 'upstream/settle',
        name: 'uppersettle1',
        component: temp,
        meta: {
          title: '上游结算'
        },
        children: [{
            path: '',
            name: 'uppersettle1',
            component: () =>
              import('@/views/finance/upstream/uppersettle1'),
            meta: {
              title: ''
            },
          },
          {
            path: 'step2',
            name: 'uppersettle2',
            component: () =>
              import('@/views/finance/upstream/uppersettle2'),
            meta: {
              title: '保单校验'
            }
          },
          {
            path: 'step3',
            name: 'uppersettle3',
            component: () =>
              import('@/views/finance/upstream/uppersettle3'),
            meta: {
              title: '结算完成'
            }
          }
        ]
      },
      {
        path: 'downstream/settle',
        name: 'financedownmenu',
        component: temp,
        //component: () => import('@/views/finance/downstream/downsettle1'),
        meta: {
          title: '下游结算'
        },
        // hidden: true
        children: [{
            path: '',
            name: 'financedown',
            component: () =>
              import('@/views/finance/downstream/downsettle1'),
            meta: {
              title: ''
            },
          },
          {
            path: 'downstream/settle/step2',
            name: 'financedown2',
            component: () =>
              import('@/views/finance/downstream/downsettle2'),
            meta: {
              title: '保单校验'
            }
          },
          {
            path: 'downstream/settle/step3',
            name: 'financedown3',
            component: () =>
              import('@/views/finance/downstream/downsettle3'),
            meta: {
              title: '结算完成'
            }
          },
        ]
      },
      {
        path: 'endorsement',
        name: 'endorsementUpper',
        component: temp,
        redirect: '/finance/endorsement/upper',
        meta: {
          title: '批单结算'
        },
        children: [{
            path: '',
            name: 'upperendorsement1',
            component: () =>
              import('@/views/endorsement/upstream/upperendorsement1'),
            meta: {
              title: '上游批单结算'
            },
          },
          {
            path: 'uperstep2',
            name: 'upperendorsement2',
            component: () =>
              import('@/views/endorsement/upstream/upperendorsement2'),
            meta: {
              title: '批单校验'
            }
          },
          {
            path: 'uperstep3',
            name: 'upperendorsement3',
            component: () =>
              import('@/views/endorsement/upstream/upperendorsement3'),
            meta: {
              title: '批单结算完成'
            }
          },
          {
            path: 'down',
            name: 'downendorsement1',
            component: () =>
              import('@/views/endorsement/downstream/downendorsement1'),
            meta: {
              title: '下游批单结算'
            },
          },
          {
            path: 'downstep2',
            name: 'downendorsement2',
            component: () =>
              import('@/views/endorsement/downstream/downendorsement2'),
            meta: {
              title: '批单校验'
            }
          },
          {
            path: 'downstep3',
            name: 'downendorsement3',
            component: () =>
              import('@/views/endorsement/downstream/downendorsement3'),
            meta: {
              title: '批单结算完成'
            }
          },//SettlementAmendment
           {
            path: 'SettlementAmendment1',
            name: 'SettlementAmendment1',
            component: () =>
              import('@/views/endorsement/SettlementAmendment/SettlementAmendment1'),
            meta: {
              title: '下游结算批改'
            }
          }
        ]
      },
      {
        path: 'endorsement/detail/:id',
        name: 'endorsementDetail',
        component: () =>
          import('@/views/endorsement/details/endorsementdetail'),
        meta: {
          title: '批单详情'
        }
      },
      {
        path: 'settles',
        name: 'billingdetails',
        component: () =>
          import('@/views/finance/billingdetails/index'),
        meta: {
          title: '结算明细'
        }
      },
      {
        // path: 'settlement',
        // name: 'billSettlement',
        // component: () =>
        //   import('@/views/finance/billSettlement/index'),
        // meta: {
        //   title: '账单结算'
        // }


        path: 'settlement',
        name: 'billSettlementmenu',
        redirect: '/finance/settlement/upbillSettlement',
        component: temp,
        //component: () => import('@/views/finance/downstream/downsettle1'),
        meta: {
          title: '账单结算'
        },
        // hidden: true
        children: [
          {
            path: '',
            name: 'upbillSettlement',
            component: () =>
             import('@/views/finance/billSettlement/upbillSettlement'),
            meta: {
              title: '上游结算账单'
            },
          },
          {
            path: 'upbillSettlementlist',
            name: 'upbillSettlementlist',
            component: () =>
              import('@/views/finance/billSettlement/upbillSettlementlist'),
            meta: {
              title: '上游结算明细'
            }
          },
          {
            path: 'downbillSettlement',
            name: 'downbillSettlement',
            component: () =>
             import('@/views/finance/billSettlement/downbillSettlement'),
            meta: {
              title: '下游结算账单'
            },
          },
          {
            path: 'downbillSettlementlist',
            name: 'downbillSettlementlist',
            component: () =>
              import('@/views/finance/billSettlement/downbillSettlementlist'),
            meta: {
              title: '下游结算明细'
            }
          },
        ]
      }
    ]
  },
  {
    path: '/report',
    component: Layout,
    redirect: '/report/overview',
    name: 'reportsMenu',
    meta: {
      title: '报表总览',
      icon: 'tongji'
    },
    children: [{
        path: 'overview',
        name: 'pandect',
        component: () =>
          import('@/views/reportform/pandect'),
        meta: {
          title: '报表总览'
        }
      },
      {
        path: 'dayform',
        name: 'dayform',
        component: () =>
          import('@/views/reportform/dayform'),
        meta: {
          title: '日趋势报表'
        }
      },
      {
        path: 'monthform',
        name: 'monthform',
        component: () =>
          import('@/views/reportform/monthform'),
        meta: {
          title: '月趋势报表'
        }
      },
      {
        path: 'pdayform',
        name: 'pdayform',
        component: () =>
          import('@/views/reportform/pdayform'),
        meta: {
          title: '保险公司日报表'
        }
      },
      {
        path: 'pmonthform',
        name: 'pmonthform',
        component: () =>
          import('@/views/reportform/pmonthform'),
        meta: {
          title: '保险公司月报表'
        }
      },
      {
        path: 'zdayform',
        name: 'zdayform',
        component: () =>
          import('@/views/reportform/zdayform'),
        meta: {
          title: '组织机构日报表'
        }
      },
      {
        path: 'zmonthform',
        name: 'zmonthform',
        component: () =>
          import('@/views/reportform/zmonthform'),
        meta: {
          title: '组织机构月报表'
        }
      },
      
      {
        path: 'targetset',
        name: 'targetset',
        component: () =>
          import('@/views/reportform/targetset'),
        meta: {
          title: '目标设置'
        }
      },
       {
        path: 'IncomeExpenditure',
        name: 'IncomeExpenditure',
        component: () =>
          import('@/views/reportform/IncomeExpenditure'),
        meta: {
          title: '保险公司收支表'
        }
      },
      //business
       {
        path: 'business',
        name: 'business',
        component: () =>
          import('@/views/reportform/business'),
        meta: {
          title: '组织机构业务表'
        }
      },
		//subordinateBusiness.vue
		 {
        path: 'subordinateBusiness',
        name: 'subordinateBusiness',
        component: () =>
          import('@/views/reportform/subordinateBusiness'),
        meta: {
          title: '下级机构业务表'
        }
      },
      //carModel
       {
        path: 'carModel',
        name: 'carModel',
        component: () =>
          import('@/views/reportform/carModel'),
        meta: {
          title: '车型报表'
        }
      },
      //newOldCar
      {
        path: 'newOldCar',
        name: 'newOldCar',
        component: () =>
          import('@/views/reportform/newOldCar'),
        meta: {
          title: '新旧车报表'
        }
      },
      //InsurancePolicy.vue
       {
        path: 'InsurancePolicy',
        name: 'InsurancePolicy',
        component: () =>
          import('@/views/reportform/InsurancePolicy'),
        meta: {
          title: '保单获取报表'
        }
      },
        {
        path: 'InsurancePolicyDetail',
        name: 'InsurancePolicyDetail',
        component: () =>
          import('@/views/reportform/InsurancePolicyDetail'),
        meta: {
          title: '保单获取报表详情'
        }
      },
      //organizationExpenditure.vue
         {
        path: 'organizationExpenditure',
        name: 'organizationExpenditure',
        component: () =>
          import('@/views/reportform/organizationExpenditure'),
        meta: {
          title: '组织机构收支表'
        }
      },
      //lowerExpenditure.vue
         {
        path: 'lowerExpenditure',
        name: 'lowerExpenditure',
        component: () =>
          import('@/views/reportform/lowerExpenditure'),
        meta: {
          title: '下级机构收支表'
        }
      },
    ]
  },
  {
    path: '/system',
    component: Layout,
    redirect: '/system/org',
    name: 'system',
    meta: {
      title: '系统设置',
      icon: 'setting'
    },
    children: [{
        path: 'org',
        name: 'orgment',
        component: () =>
          import('@/views/orgment/index'),
        meta: {
          title: '机构管理'
        }
      },
      {
        path: 'role',
        name: 'rolemanage',
        component: () =>
          import('@/views/rolemanage/role'),
        meta: {
          title: '角色管理'
        }
      },
      {
        path: 'user',
        name: 'usermentMenu',
        component: temp,
        meta: {
          title: '人员管理'
        },
        children: [{
            path: '',
            name: 'userment',
            component: () =>
              import('@/views/userment/index'),
            meta: {
              title: ''
            },
          },
          {
            path: 'userinfo',
            name: 'userinfo',
            component: () =>
              import('@/views/userment/userinfo/index'),
            meta: {
              title: '用户管理新建'
            },
            hidden: true
          },
          {
            path: 'userinfoedit',
            name: 'userinfoedit',
            component: () =>
              import('@/views/userment/userinfo/index'),
            meta: {
              title: '用户管理编辑'
            },
            hidden: true
          },
        ]
      },


      {
        path: 'adduser',
        name: 'adduser',
        component: () =>
          import('@/views/orgment/adduser/index'),
        meta: {
          title: '添加用户'
        },
        hidden: true
      },

      {
        path: 'staff',
        name: 'staffMenu',
        component: temp,
        meta: {
          title: '出单工号'
        },
        children: [{
            path: '',
            name: 'staff',
            component: () =>
              import('@/views/staffdetail/index'),
            meta: {
              title: ''
            }
          },
          {
            path: 'new/:id',
            name: 'staffnew',
            component: () =>
              import('@/views/staff/staffsedit'),
            meta: {
              title: '出单工号新建'
            },
            hidden: true
          },
          // {
          //   path: 'edit/:id',
          //   name: 'staffedit',
          //   component: () => import('@/views/staff/staff'),
          //   meta: { title: '出单工号编辑' },
          //   hidden: true
          // },
          {
            // path:'edit',
            // name:'editstaff',
            path: 'edit/:id',
            name: 'staffedit',
            component: () =>
              import('@/views/staff/staffsedit'),
            meta: {
              title: '出单工号编辑'
            }
          }
        ]
      },
      {
        path: 'announce',
        name: 'announceMenu',
        component: temp,
        meta: {
          title: '公告管理'
        },
        children: [{
            path: '',
            name: 'announce',
            component: () =>
              import('@/views/announce/index'),
            meta: {
              title: ''
            }
          },
          {
            path: 'announcenew/:id',
            name: 'announcenew',
            component: () =>
              import('@/views/announceedit/edit'),
            meta: {
              title: '公告新建'
            },
            hidden: true
          },
          {
            path: 'announceedit/:id',
            name: 'announceedit',
            component: () =>
              import('@/views/announceedit/edit'),
            meta: {
              title: '公告编辑'
            },
            hidden: true
          },
          {
            path: 'detail/:id',
            name: 'announcedetail',
            component: () =>
              import('@/views/announce/announcedetail'),

            meta: {
              title: '公告详情'
            },
            hidden: true
          },
        ]

      },
      {
        path: 'announce/announcenew/:id',
        name: 'announcenew',
        component: () =>
          import('@/views/announceedit/edit'),
        meta: {
          title: '公告新建'
        },
        hidden: true
      },
      {
        path: 'announce/announceedit/:id',
        name: 'announceedit',
        component: () =>
          import('@/views/announceedit/edit'),
        meta: {
          title: '公告编辑'
        },
        hidden: true
      },
      {
        path: 'announce/detail/:id',
        name: 'announcedetail',
        component: () =>
          import('@/views/announce/announcedetail'),
        meta: {
          title: '公告详情'
        },
        hidden: true
      },
      {
        path: 'operationlog',
        name: 'operationlog',
        component: () =>
          import('@/views/operationlog/index'),
        meta: {
          title: '操作日志'
        }
      },
      {
        path: 'changepas',
        name: 'chnagepas',
        component: () =>
          import('@/views/chnagepas/index'),
        meta: {
          title: '修改密码'
        }
      },
    ]
  },
  {
    path: '/pay',
    component: Layout,
    name: 'payMenu',
    redirect: '/pay/payoverview',
    meta: {
      title: '薪金宝',
      icon: 'money'
    },
    children: [{
        path: 'payinfo',
        name: 'payinfo',
        component: () =>
          import('@/views/pay/payinfo'),
        meta: {
          title: '支付信息',
        }
      },
      {
        path: 'payuser',
        name: 'payuserMenu',
        component: temp,
        meta: {
          title: '用户信息',
        },
        children: [{
            path: '',
            name: 'payuser',
            component: () =>
              import('@/views/pay/payuser'),
            meta: {
              title: ''
            }
          },
          {
            path: 'payuserdetail',
            name: 'payuserdetail',
            component: () =>
              import('@/views/pay/payuserdetail'),
            meta: {
              title: '用户详情'
            }
          },

        ]
      },
      //    {
      //      path: 'payagree',
      //      name: 'payagree',
      //      component: () => import('@/views/pay/payagree'),
      //      meta: { title: '用户协议', }
      //    },
      {
        path: 'payoverview',
        name: 'payoverviewMenu',
        component: temp,
        meta: {
          title: '佣金概述',
        },
        children: [{
            path: '',
            name: 'payoverview',
            component: () =>
              import('@/views/pay/payoverview'),
            meta: {
              title: ''
            }
          },
          {
            path: 'paysetpwd',
            name: 'paysetpwd',
            component: () =>
              import('@/views/pay/paysetpwd'),
            meta: {
              title: '支付密码'
            }
          },
          {
            path: 'payagree',
            name: 'payagree',
            component: () =>
              import('@/views/pay/payagree'),
            meta: {
              title: '用户协议'
            }
          },

        ]
      },
      {
        path: 'payacc',
        name: 'payacc',
        component: () =>
          import('@/views/pay/payacc'),
        meta: {
          title: '权限控制',
        }
      }, {
        path: 'payacc',
        name: 'payaccs',
        component: () =>
          import('@/views/pay/payacc'),
        meta: {
          title: '权限控制',
        }
      }, {
        path: 'company',
        name: 'company',
        component: () =>
          import('@/views/pay/company'),
        meta: {
          title: '公司信息',
        }
      },
      {
        path: 'businessbill/putout',
        name: 'putoutMenu',
        component: temp,
        meta: {
          title: '企业账单',
        },
        children: [{
            path: '',
            name: 'putout',
            component: () =>
              import('@/views/pay/businessbill/putout'),
            meta: {
              title: '佣金发放明细',
            }
          },
          {
            path: 'detail',
            name: 'detail',
            component: () =>
              import('@/views/pay/businessbill/detail'),
            meta: {
              title: '企业账单明细',
            }
          },
          {
            path: 'outgold',
            name: 'outgold',
            component: () =>
              import('@/views/pay/businessbill/outgold'),
            meta: {
              title: '出金明细',
            }
          },
          {
            path: 'detailcon',
            name: 'detailcon',
            component: () =>
              import('@/views/pay/businessbill/detailcon'),
            meta: {
              title: '佣金发放详情',
            }
          },
        ]
      },

      {
        path: 'paytransfer',
        name: 'paytransferMenu',
        component: temp,
        meta: {
          title: '佣金发放'
        },
        children: [{
            path: '',
            name: 'manageIndex',
            component: () =>
              import('@/views/pay/transfer/manageIndex'),
            meta: {
              title: ''
            }
          },
          // {
          //     path: 'entry1',
          //     name: 'entry1',
          //     component: () =>
          //       import ('@/views/pay/index'),
          //     meta: { title: '单笔发放' }
          //   },
            {
              path: 'entry',
              name: 'entry2',
              component: () =>
                import ('@/views/pay/index'),
              meta: { title: 'excel导入发放' }
            },
          {
            path: 'tasks',
            name: 'entry3',
            component: () =>
              import('@/views/pay/index'),
            meta: {
              title: '查看转账任务'
            }
          },
          {
            path: 'load',
            name: 'load',
            component: () =>
              import('@/views/pay/entry'),
            meta: {
              title: '登记成功'
            },
            hidden: true
          },
          {
            path: 'indetail:id',
            name: 'indetail',
            component: () =>
              import('@/views/pay/detail'),
            meta: {
              title: '查看详情'
            },
            hidden: true
          },
          {
            path: 'lead',
            name: 'lead',
            component: () =>
              import('@/views/pay/upload'),
            meta: {
              title: '上传成功'
            },
            hidden: true
          },
          {
            path: 'paysetpwd3',
            name: 'paysetpwd3',
            component: () =>
              import('@/views/pay/paysetpwd'),
            meta: {
              title: '支付密码'
            }
          },
        ]
      },
    ]
  },




  {
    path: '/demo',
    component: Layout,
    name: 'demoMenu',
    meta: {
      title: '示例',
      icon: 'pipei'
    },
    children: [{
        path: '',
        name: 'demo',
        component: () =>
          import('@/views/demo/index'),
        meta: {
          title: '样式示例',
        }
      },
      {
        path: 'demo3',
        name: 'demo3',
        component: () =>
          import('@/views/demo/index2'),
        meta: {
          title: 'demo3',
        }
      },
      {
        path: 'transferdemo',
        name: 'transferdemo',
        component: () =>
          import('@/views/demo/transferdemo'),
        meta: {
          title: 'transferdemo',
        }
      },
      {
        path: 'demo1',
        name: 'demo1',
        component: () =>
          import('@/views/demo1/index'),
        meta: {
          title: 'demo1',
        }
      },
      {
        path: 'demo2',
        name: 'demo2',
        component: () =>
          import('@/views/demo1/table1'),
        meta: {
          title: 'demo2',
        }
      },
      {
        path: 'demo4',
        name: 'demo4',
        component: () =>
          import('@/views/demo/sortdemo/index'),
        meta: {
          title: 'demo4',
        }
      },
      {
        path: 'demo5',
        name: 'demo5',
        component: () =>
          import('@/views/demo/sortdemo/outer'),
        meta: {
          title: 'demo5',
        }
      },
      {
        path: 'select',
        name: 'select',
        component: () =>
          import('@/views/demo/treeselect/index'),
        meta: {
          title: '树形下拉',
        }
      },
      // {
      //   path: 'demo1',
      //   name: 'demo1',
      //   component: () =>
      //     import ('@/views/demo1/index'),
      //   meta: { title: '样式示例', }
      // },
      {
        path: 'table',
        name: 'Table',
        component: () =>
          import('@/views/table/index'),
        meta: {
          title: 'Table'
        }
      },
      {
        path: 'tree',
        name: 'Tree',
        component: () =>
          import('@/views/tree/index'),
        meta: {
          title: 'Tree'
        }
      },
      {
        path: 'form',
        name: 'Form',
        component: () =>
          import('@/views/form/index'),
        meta: {
          title: '表单'
        }
      }
    ]
  },



  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]

export default new Router({
  // mode: 'history', //后端支持可开
  scrollBehavior: () => ({
    y: 0
  }),
  routes: constantRouterMap
})
